Use of frame caching to improve packet loss recovery

ABSTRACT

Various new and non-obvious apparatus and methods for using frame caching to improve packet loss recovery are disclosed. One of the disclosed embodiments is a method for using periodical and synchronized frame caching within an encoder and its corresponding decoder. When the decoder discovers packet loss, it informs the encoder which then generates a frame based on one of the shared frames stored at both the encoder and the decoder. When the decoder receives this generated frame it can decode it using its locally cached frame.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No. 13/614,453, filed Sep. 13, 2012 (now U.S. Pat. No. 9,313,501), which is a continuation of U.S. application Ser. No. 11/027,294, filed Dec. 30, 2004 (now U.S. Pat. No. 8,634,413), which applications are incorporated herein by reference in their entirety.

COPYRIGHT AUTHORIZATION

A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by any one of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.

TECHNICAL FIELD

The present invention relates generally to techniques for digitally encoding, decoding and processing video, images and other digital media content. The present invention relates particularly to improving packet loss recovery by frame caching.

BACKGROUND

Digital video consumes large amounts of storage and transmission capacity. A typical raw digital video sequence includes 15 or 30 frames per second. Each frame can include tens or hundreds of thousands of pixels (also called pels). Each pixel represents a tiny element of the picture. In raw form, a computer commonly represents a pixel as a set of three samples totaling 24 bits. For instance, a pixel may comprise an 8-bit luminance sample (also called a luma sample) that defines the grayscale component of the pixel and two 8-bit chrominance sample values (also called chroma samples) that define the color component of the pixel. Thus, the number of bits per second, or bitrate, of a typical raw digital video sequence may be five million bits per second or more.

Many computers and computer networks lack the resources to process raw digital video. For this reason, engineers use compression (also called coding or encoding) to reduce the bitrate of digital video. Compression decreases the cost of storing and transmitting video by converting the video into a lower bitrate form. Decompression (also called decoding) reconstructs a version of the original video from the compressed form. A “codec” is an encoder/decoder system. Compression can be lossless, in which the quality of the video does not suffer, but decreases in the bitrate are limited by the inherent amount of variability (sometimes called entropy) of the video data. Or, compression can be lossy, in which quality of the video suffers, but achievable decreases in the bitrate are more dramatic. Lossy compression is often used in conjunction with lossless compression—in a system design in which the lossy compression establishes an approximation of information and lossless compression techniques are applied to represent the approximation.

In general, video compression techniques include “intrapicture” compression and “interpicture” compression, where a picture is, for example, a progressively scanned video frame, an interlaced video frame (having alternating lines for video fields), or an interlaced video field. Generally speaking, video sequences contain a significant amount of redundancy within a given frame, and between sequential frames. For example, the human eye generally does not notice slight differences in otherwise similar backgrounds in successive video frames. Compression exploits these redundancies by removing a certain portion of the redundant material within the bitstream being sent, and then adding them back in at the receiving end when the picture is uncompressed. Two common redundancies that are subtracted out of video frames are spatial and temporal. Spatial redundancies occur between neighboring pixels within a single frame. Frames that are compressed using spatial redundancies, known as intraframes, or I-frames, contain all of the information needed to reconstitute the image within the frame itself—they are self-contained. Frames that use temporal redundancies, such as P-frames and B-frames, require information from other frames to be decoded. P-frames (predictively encoded frames) are encoded, and must be decoded, using information from previous I- and/or P-frames. B-frames (bi-directionally predictively-encoded frames) are encoded using information from both previous and subsequent I- and P-frames. Motion estimation removes temporal redundancy in successive video frames (interframes) by encoding the unique matter along with a motion-predicted image created from a previously-encoded image known as a reference frame. If a reference frame is lost, then its succeeding predictive frames cannot be deciphered—the transmission errors propagate to successive frames.

For progressive frames, intrapicture compression techniques compress individual frames (typically called I-frames or key frames), and interpicture compression techniques compress frames (typically called predicted frames, P-frames, or B-frames) with reference to preceding and/or following frames (typically called reference or anchor frames). I-frames (self-contained) and P-frames (which generally refer to preceding frames) can themselves be reference frames, while B-frames, which refer to both preceding and following frames, are typically never used as references themselves.

When the data is decompressed prior to the resulting video being displayed, a decoder typically performs the inverse of the compression operations. For example, a decoder may perform entropy decoding, inverse quantization, and an inverse transform while decompressing the data. When motion compensation is used, the decoder (and encoder) reconstruct a frame from one or more previously reconstructed frames (which are now used as reference frames), and the newly reconstructed frame may then be used as a reference frame for motion compensation for later frames.

Packets sent through networks are subject to loss—packets are dropped. This loss occurs randomly and unpredictably. Furthermore, video compression stream data is highly sensitive to delay; as the packets need to be reassembled in the same order that they were sent; too many delayed packets give rise to a jumpy, interrupted signal. Transmission delay problems can also occur in resending a new I-frame; the new frame is susceptible to all of the same problems that corrupted the lost reference frame. Furthermore, in lossy coding schemes, the compression is designed to meet a target bitrate for storage and transmission. High compression is achieved by lowering the quality of the reconstituted image. Therefore, any extra loss caused by dropped or delayed packets may degrade the image below an acceptable rate.

The capacity to handle packet loss is crucial for real-time video codec (RTC) to perform well in noisy networks—those susceptible to loss. Most of the existing video codecs cope with packet loss by requesting a new I-frame when a reference frame is lost. Others use slice-based coding, which adds to the signaling overhead. FIG. 1 illustrates traditional packet loss recovery by requesting a new I-frame.

In this prior art method, an I-frame 104 is received at the decoder 102. It is then used to interpret/reconstruct subsequent dependent P-frame 106. The next dependent frame, P-frame 108 is corrupted, as sufficient packets are received out of order or lost. The subsequent P-frame 110 and any following frames can no longer be reconstructed. At the destination node (here represented by decoder 102) an I-frame request is generated and sent to the source node (here represented by encoder 114). Each subsequent P-frame or B-frame cannot be reconstructed until a new I-frame is received. Once the source node 114 receives the request, it assembles a new I-frame 112 and sends it to the destination node 102 using the communications channel. After receiving the new I-frame 112 the destination channel can successfully decode the subsequent P-frames. However, this results in a delay 116 equivalent to the time needed to send the initial request, plus the time to encode the I-frame, plus the time to send the I-frame to the destination node 102. Moreover, a sender and a receiver may be separated by a large amount of physical distance, with the long trip creating a noticeable lag-time with a corresponding degradation in the quality of the video.

In another prior art method, I-frames 104, 112 are sent at regular intervals. When an I-frame 112 is lost due to corruption or delay, the decoder waits until the next I-frame is received, incorrectly decoding the subsequent P-frames 110, 108, 106.

Therefore, there exists a need for improved methods and systems for transmitting compressed video over a lossy packet based network.

SUMMARY

A video codec described herein includes a frame cache at the encoder and a corresponding frame cache at the decoder, each of which can work in synchronization. A frame in the decoder cache is used to help interpret a frame at the decoder. The frame to be interpreted may have been generated using a copy of the same frame stored in the encoder cache.

A system implementation is also provided. It comprises an encoder, which encodes data packets into frames, and an encoder cache, which can store a frame or a portion of a frame. It further comprises a decoder, with a decoder cache, which can also store a frame or a portion of one. The decoder is operable to detect packet loss. When such a loss is detected, in some embodiments, the encoder encodes a frame using the frame stored at the encoder cache, which is then decoded at the decoder using the frame stored in the decoder cache.

This caching mechanism provides the following key features:

a) more efficient bandwidth utilization during packet loss recovery, and

b) eliminating signaling overhead associated with slice-based coding.

Additional features and advantages of the invention will be made apparent from the following detailed description of embodiments that proceeds with reference to the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a prior art diagram of frame level packet loss recovery.

FIG. 2 is a block diagram of a video utilizing the frame caching described herein.

FIG. 3 is a block diagram of a video decoder utilizing the frame caching described herein.

FIG. 4 is a flowchart of an exemplary method for recovering from packet loss utilizing frame caching.

FIG. 5A is a frame-level diagram of an encoder caching a frame and a decoder caching the same frame.

FIG. 5B is a frame-level diagram of a corrupted P-frame arriving at a decoder.

FIG. 5C is a frame-level diagram depicting the decoder using a cached frame to interpret a P-frame.

FIG. 5D is a block diagram of reporting packet loss through a feedback channel.

FIG. 6 is a flowchart of a suitable method for implementing video encoder/decoder caching.

FIG. 7 is a block diagram of a suitable computing environment for the video encoder/decoder of FIGS. 2 and 3.

DETAILED DESCRIPTION

The following description is directed to implementations of a frame cache in both a video encoder and a video decoder, which is designed to provide an effective combination of graceful packet loss recovery and efficient bandwidth utilization. An exemplary application of the frame cache is in an image or video encoder and decoder. Accordingly, the frame cache is described in the context of a generalized image or video encoder and decoder, but alternatively, can be incorporated in the encoder and decoder of various other image and video codecs that may vary in details from this exemplary apparatus described below.

1. Generalized Video Encoder and Decoder

FIG. 2 is a block diagram of a generalized video encoder 200 and FIG. 3 is a block diagram of a generalized video decoder 300, in which the frame caches can be incorporated

The relationships shown between modules within the encoder and decoder indicate the main flow of information in the encoder and decoder; other relationships are not shown for the sake of simplicity. In particular, FIGS. 2 and 3 usually do not show side information indicating the encoder settings, modes, tables, etc. used for a video sequence, frame, macroblock, block, etc. Such side information is sent in the output bitstream, typically after entropy encoding of the side information. The format of the output bitstream can be a Windows Media Video format or another format.

Depending on implementation and the type of compression desired, modules of the encoder 200 or decoder 300 can be added, omitted, split into multiple modules, combined with other modules, and/or replaced with like modules. In alternative embodiments, encoder or decoders with different modules and/or other configurations of modules perform one or more of the described techniques.

A. Video Encoder

FIG. 2 is a block diagram of a general video encoder system 200. The encoder system 200 receives a sequence of video frames, including a current frame 205, and produces compressed video information 295 as output. Particular embodiments of video encoders typically use a variation or supplemented version of the generalized encoder 200.

The encoder system 200 compresses predicted frames and key frames. For the sake of presentation, FIG. 2 shows a path for key frames through the encoder system 200 and a path for forward-predicted frames. Many of the components of the encoder system 200 are used for compressing both key frames and predicted frames. The exact operations performed by those components can vary depending on the type of information being compressed.

A predicted frame [which might be a P-frame, a B-frame (bi-directional prediction), or an inter-coded frame] is represented in terms of prediction (or difference) from one or more other frames. A prediction residual is the difference between what was predicted and the original frame. In contrast, a key frame [also called an I-frame, or an intra-coded frame] is compressed without reference to other frames.

If the current frame 205 is a forward-predicted frame, a motion estimator 210 estimates motion of macroblocks or other sets of pixels of the current frame 205 with respect to a reference frame 225, which is the reconstructed previous frame buffered in the frame store 220. In alternative embodiments, the reference frame can be a later frame or the current frame can be bi-directionally predicted. The motion estimator 210 outputs as side information motion information 215, such as motion vectors. A motion compensator 230 applies the motion information 215 to the reconstructed previous frame 225 to form a motion-compensated current frame 235. The prediction is rarely perfect, however, and the difference between the motion-compensated current frame 235 and the original current frame 205 is the prediction residual 245. Alternatively, a motion estimator 210 and motion compensator 230 apply another type of motion estimation/compensation.

A frequency transformer 260 converts the spatial domain video information into frequency domain (i.e., spectral) data. For block-based video frames, the frequency transformer 260 applies a transform described in the following sections that has properties similar to the discrete cosine transform [“DCT”]. In some embodiments, the frequency transformer 260 applies a frequency transform to blocks of spatial prediction residuals for key frames. The frequency transformer 260 can apply an 8×8, 8×4, 4×8, or other size frequency transforms.

A quantizer 270 then quantizes the blocks of spectral data coefficients. The quantizer 270 applies uniform, scalar quantization to the spectral data with a step-size that varies on a frame-by-frame basis or other basis. Alternatively, the quantizer 270 applies another type of quantization to the spectral data coefficients, for example, a non-uniform, vector, or non-adaptive quantization, or directly quantizes spatial domain data in an encoder system that does not use frequency transformations. In addition to adaptive quantization, the encoder 200 can use frame dropping, adaptive filtering, or other techniques for rate control.

When a reconstructed current frame is needed for subsequent motion estimation/compensation, an inverse quantizer 276 performs inverse quantization on the quantized spectral data coefficients. An inverse frequency transformer 266 then performs the inverse of the operations of the frequency transformer 260, producing a reconstructed prediction residual (for a predicted frame) or a reconstructed key frame. If the current frame 205 was a key frame, the reconstructed key frame is taken as the reconstructed current frame (not shown). If the current frame 205 was a predicted frame, the reconstructed prediction residual is added to the motion-compensated current frame 235 to form the reconstructed current frame. The frame store 220 buffers the reconstructed current frame for use in predicting the next frame. In some embodiments, the encoder 200 applies a deblocking filter to the reconstructed frame to adaptively smooth discontinuities in the blocks of the frame.

The entropy coder 280 compresses the output of the quantizer 270, as well as certain side information (e.g., motion information 215, quantization step size). Typical entropy coding techniques include arithmetic coding, differential coding, Huffman coding, run length coding, LZ coding, dictionary coding, and combinations of the above. The entropy coder 280 typically uses different coding techniques for different kinds of information (e.g., DC coefficients, AC coefficients, etc.), and can choose from among multiple code tables within a particular coding technique.

The entropy coder 280 puts compressed video information 295 in the buffer 290. A buffer level indicator is fed back to bitrate adaptive modules. The compressed video information 295 is depleted from the buffer 290 at a constant or relatively constant bitrate and stored for subsequent streaming at that bitrate. Alternatively, the encoder system 200 streams compressed video information 295 immediately following compression.

Before or after the buffer 290, the compressed video information 295 can be channel-coded for transmission over the network. The channel coding can apply error detection and correction data to the compressed video information 295.

B. Video Decoder

FIG. 3 is a block diagram of a general video decoder system 300. The decoder system 300 receives information 395 for a compressed sequence of video frames and produces output, including a reconstructed frame 305. Particular embodiments of video decoders typically use a variation or supplemented version of the generalized decoder 300.

The decoder system 300 decompresses predicted frames and key frames. For the sake of presentation, FIG. 3 shows a path for key frames through the decoder system 300 and a path for forward-predicted frames. Many of the components of the decoder system 300 are used for compressing both key frames and predicted frames. The exact operations performed by those components can vary depending on the type of information being compressed.

A buffer 390 receives the information 395 for the compressed video sequence and makes the received information available to the entropy decoder 380. The buffer 390 typically receives the information at a rate that is fairly constant over time, and includes a jitter buffer to smooth short-term variations in bandwidth or transmission. The buffer 390 can include a playback buffer and other buffers, as well. Alternatively, the buffer 390 receives information at a varying rate. The compressed video information 395 can be decoded and processed for error detection and correction either before it reaches the buffer 390, after it leaves the buffer 390, or both.

The entropy decoder 380 entropy decodes entropy-coded quantized data, as well as entropy-coded side information (e.g., motion information, quantization step size), typically applying the inverse of the entropy encoding performed in the encoder 200. Entropy decoding techniques include arithmetic decoding, differential decoding, Huffman decoding, run length decoding, LZ decoding, dictionary decoding, and combinations of the above. The entropy decoder 380 frequently uses different decoding techniques for different kinds of information (e.g., DC coefficients, AC coefficients, different kinds of side information), and can choose from among multiple code tables within a particular decoding technique.

If the frame 305 to be reconstructed is a forward-predicted frame, a motion compensator 330 applies motion information 315 to a reference frame 325 to form a prediction 335 of the frame 305 being reconstructed. For example, the motion compensator 330 uses a macroblock motion vector to find a macroblock in the reference frame 325. A frame buffer 320 stores previous reconstructed frames for use as reference frames. Alternatively, a motion compensator applies another type of motion compensation. The prediction by the motion compensator 330 is rarely perfect, so the decoder 300 also reconstructs prediction residuals 345.

When the decoder 300 needs a reconstructed frame for subsequent motion compensation, the frame store 320 buffers the reconstructed frame 305 for use in predicting the next frame. In some embodiments, the encoder 200 applies a deblocking filter to the reconstructed frame 305 to adaptively smooth discontinuities in the blocks of the frame.

An inverse quantizer 370 inverse quantizes entropy-decoded data. In general, the inverse quantizer 370 applies uniform, scalar inverse quantization to the entropy-decoded data with a step-size that varies on a frame-by-frame basis or other basis. Alternatively, the inverse quantizer 370 applies another type of inverse quantization to the data, for example, a non-uniform, vector, or non-adaptive quantization, or directly inverse quantizes spatial domain data in a decoder system that does not use inverse frequency transformations.

An inverse frequency transformer 360 converts the quantized, frequency domain data into spatial domain video information. For block-based video frames, the inverse frequency transformer 360 applies an inverse transform described in the following sections. In some embodiments, the inverse frequency transformer 360 applies an inverse frequency transform to blocks of spatial prediction residuals for key frames. The inverse frequency transformer 360 can apply an 8×8, 8×4, 4×8, or other size inverse frequency transforms.

C. Frame Caching

In implementations which use frame caching within a video codec architecture described herein, reference frames are cached preferably at both the encoder and decoder in sequence. When a reference frame is lost, the subsequent dependent frames can be decoded using the appropriate reference frame cached at the decoder. This produces the following benefits:

A) More efficient bandwidth utilization: Prior art methods call for an I-frame to be generated and sent to the encoder. This method allows for a special type of frame, an SP-frame, to be sent to the decoder, and then cached until needed. SP-frames can generally be coded with fewer bits than I-frames of the same quality, and therefore, use less bandwidth than using an equivalent I-frame.

B) Faster error recovery: Preferably an SP-frame is already cached at the decoder when packet loss occurs; this allows the next P-frame in the stream to be interpreted with little lag time.

2. Overview of Exemplary Methods

Described embodiments include techniques and tools for caching frames at a decoder, and then using the cached frames to reconstruct P-frames and B-frames that depend on reference frames that have been corrupted or lost. The cache can be incorporated as part of the video decoder 300 (FIG. 3), as part of the video encoder 200 (FIG. 2), or, preferably, both. When packet loss is detected by the decoder, it sends a message to the encoder 300, which then generates a new reference frame based on one of the shared cached frames. The generated reference frame is then sent to the decoder. The cached frame is used at the decoder to decode the generated frame and subsequent dependent frames until another reference frame arrives at the decoder. The flowchart elements described herein are only examples; other flowchart elements can be used in accordance with the described techniques. Furthermore, the flowchart elements can occur in different orders, or specific process blocks can be skipped in accordance with the described techniques and tools.

The described techniques and tools can be used in combination with one another or with other techniques and tools, or can be used independently.

Referring to FIG. 4, flowchart 400 shows a brief overview of the methods disclosed herein. At process block 402, a portion of a video signal that is to be transmitted over a network is assigned to packets. At process block 404, an encoder encodes at least a portion of the packets into frames. These frames may consist of reference frames 325, such as I-frames and P-frames, and may also consist of B-frames, which are not used as references for any other frame types. Alternate types of frames, such as skip frames, may also be encoded into frames. At optional process block 406, a frame, generally a reference frame, may be cached at the encoder. If the frame is cached, it is assigned the type “Cached-Frame” (CF) in its frame header. The frame that was cached, with other frames, is then transmitted to the decoder at process block 408. Once the frame is at the decoder, it is cached in a decoder cache at process block 410. Typical cached frame types are P-frames and I-frames.

If a subsequent reference frame is lost, then the cached frame may be used to decompress a following dependent frame, as shown at process block 412. The flowchart 400 shows only one exemplary embodiment and should not be construed as limiting in any way. For example, the cache associated with the encoder at decision block 406 is optional. The method 400 may be implemented in a video codec as is shown in FIGS. 2 and 3, which may be implemented in software, hardware, or a combination of both.

3. Exemplary Method for Caching Frames

FIGS. 5A through 5D show an exemplary method of caching frames to enable optimum performance of video codecs in noisy networks. With reference to FIG. 5D, in an exemplary embodiment, frames are transmitted from an encoder 502D to a decoder 506D through a main channel, such as RTP (real time transport protocol) 508D. The internet often loses packets, or delivers packets out of order. Packets may also be delayed by some random amount of time, which may also make them unusable. A packet loss event is detected by the decoder 506D and signaled through a feedback channel from the decoder to the encoder 502D. To correctly reconstruct a message, in some embodiments, the RTP 508D header contains information and a sequence number that both allows the receiver to reorder packets correctly and to determine the number of packets that are being lost. The RTP 508D is augmented by its control protocol (RTPC) 504D, used to provide a feedback channel that can be used to monitor data delivery. Each data packet has a sequence number, typically incremented by one for each subsequent data packet. In an exemplary embodiment, the packet loss is detected by the decoder 506D when a sequence number is not received. Once the decoder 506D has discovered a lost packet, it sends a message through the feedback channel 504D informing the encoder 502D which packet (or packets) have been lost. In some embodiments, only information about the initial packet lost is provided. In other embodiments, additional information, such as the number of dropped packets, or a list of the specific packets lost, is also provided. The location of the packet loss is preferably transmitted using the timestamp of the earliest packet loss in the reporting window. This information enables the encoder 502D to determine which cached reference to use.

With reference to FIG. 5A, the encoder 502A periodically caches frames in a frame cache 504A. Which frames to cache, how often caching should occur, and the number of frames that should be able to be cached at a single time is highly implementation-dependent. The frames cached, in some embodiments, are reference frames, that is, P-frames and I-frames. Other frame types can also be cached. The frame that was cached 506A (or a copy thereof) is also sent to the decoder 512A. Such a frame, which is also stored in the encoder cache 504A, is defined in its header as of frame type CF (cached frame). In some embodiments, this header allows synchronization of the encoder 502A and decoder 512A by letting the decoder 512A know that this specific frame should be cached in the decoder cache 510A for later use. Table 1, below, shows an exemplary embodiment of frame type codes, including the cached frame (CF) type.

TABLE 1 Frame Type Codes Frame Type Code Word (Binary) I 110 P 0 B 10 BI 1110 SKIP 11111 SP 111100 CF 111101

When the frame of type CF 508A reaches the decoder 512A, it is stored in the decoder frame cache 510A. Storing each frame of type CF at the decoder 512A is one method of synchronizing the encoder and decoder frame caches 504A and 510A. However, other methods of synchronizing these frame caches are also envisioned.

When packet loss 502B is detected at the decoder 504B, it is reported back to the encoder 502A using the feedback channel 504D. This report, preferably, contains timestamp information which allows the encoder 502A to choose the correct cached frame 504A to reference. In other embodiments, the latest cached frame is used. Once a cached frame has been chosen 504C, it is used by the encoder 502C to encode the next frame 506C, preferably a P-frame, but I-frames and other frame types can also be encoded. This frame encoded using the cached frame 506C is known as a “Super-P” frame (SP-frame) and is signaled as such in its header. An exemplary frame type code word for the SP-frame is shown in Table 1, above.

When the decoder 512C receives the SP-frame 508C, it decodes it into an uncompressed frame (U-frame) 514C using the frame cached locally 510C. Using this method, the recovery time at the decoder 512C is the interval between the packet loss event and the arrival of the SP-frame. If this generated SP-frame 508C is lost during transmission, the decoder 512C will continue sending packet loss reports until the arrival of a new reference frame (generally of type P, SP, or I). The actual recovery time from packet loss is a function, primarily, of the packet loss reporting interval.

In some implementations, the encoder 502A caches a frame 504A and sends a copy of the cached frame 506A to the decoder periodically. The length of time between cached frames being sent is highly implementation-dependent. Some implementations may cache the frames at equal intervals. Other implementations may cache the frames at intervals which are themselves dependent upon system variables such as the speed of the network or the amount of loss the network is experiencing.

4. Exemplary System Embodiment

FIG. 6 illustrates another exemplary embodiment of a video system 600 that can be used to implement decoder- and encoder-based frame caching. The video system 600 is not intended to suggest any limitation as to scope of use or functionality of the invention, as the present invention may be implemented in diverse general- or special-purpose video systems.

The video system contains at least one encoder 602. This encoder further comprises an encoder cache 604. In the illustrated embodiment, the cache resides within the encoder 602, but in other implementations may reside elsewhere within the video system. The encoder cache 604 is enabled to store one or more sections of video frames 606. By way of suggestion and not limitation, these sections of frames may consist of a number of blocks, macroblocks, a number of slices, entire frames, groups of frames, or any other division of frames that can be envisioned by one of skill in the art. The encoder cache 604 may cache only one frame portion, may cache two portions, or any number of portions that might be desirable for a given implementation. The video system 600 also comprises a decoder 608. Similar to the encoder 602, the decoder 608 contains a decoder cache 610, which is used to store one or more portions of video frames 612. These video frame portions may comprise of one or more blocks, macroblocks, slices, or may comprise entire frames, groups of frames, or other division of frame that can be envisioned by one of skill in the art. The decoder cache 610 may be set up to store one frame portion, two frame portions, or any other number of frame portions.

The video system 600 also comprises a synchronizer 614, which is used to ensure that the encoder cache 604 and the decoder cache 610 contain substantially similar information. As discussed previously, the synchronizer may comprise a unique frame header attached to certain frames or portions of frames, applied by the encoder 602, that inform the decoder 608 that a specific frame or portion of a frame is to be cached. For example, a frame may be stored at the encoder cache 604 and also sent to the decoder 608. That frame may have a distinctive CF (Cached Frame) header to indicate that there is a copy of it stored in the encoder cache 604. When the decoder 608 detects packet loss or other corruption that makes decoding a frame difficult or impossible, the subsequent frame encoded by the encoder 602 from the frame stored in the encoder cache 604 may be marked to indicate that this frame can be decoded from a frame at the decoder cache 610. Some implementations may have multiple frames stored at the decoder cache 610; in such a case, the header may also optionally contain sufficient other information to determine which cached frame should be used. Other methods of synchronization are also envisioned. A transmitter 616 transmits the frames from the encoder 602 to the decoder 608.

5. Computing Environment

The above described implementations of frame caching can be performed on any of a variety of devices in which image and video signal processing is performed, including among other examples, computers, image and video recording, transmission and receiving equipment, portable video players video conferencing, web video streaming applications, etc. The image and video coding techniques can be implemented in hardware circuitry (e.g., in circuitry of an ASIC, FPGA, etc.), as well as in image and video processing software executing within a computer or other computing environment (whether executed on the central processing unit (CPU), or dedicated graphics processor, video card or like), such as shown in FIG. 7.

FIG. 7 illustrates a generalized example of a suitable computing environment 700 in which the described frame caching may be implemented. The computing environment 700 is not intended to suggest any limitation as to scope of use or functionality of the invention, as the present invention may be implemented in diverse general- or special-purpose computing environments.

The computing environment 700 includes at least one processing unit 710 and memory 720. This most basic configuration 730 is included within a dashed line. The processing unit 710 executes computer-executable instructions and may be a real or virtual processor. In a multi-processing system, multiple processing units execute computer-executable instructions to increase processing power. The memory 720 may be volatile memory (e.g., registers, cache, RAM, etc.), non-volatile memory (e.g., ROM, EEPROM, flash memory, etc.), or some combination of the two. The memory 720 stores software 780 implementing the described encoder/decoder caching.

A computing environment may have additional features. For example, the computing environment 700 includes storage 740, one or more input devices 750, one or more output devices 760, and one or more communication connections 770. An interconnection mechanism (not shown) such as a bus, controller, or network interconnects the components of the computing environment 700. Typically, operating system software (not shown) provides an operating environment for other software executing in the computing environment 700, and coordinates activities of the components of the computing environment 700.

The storage 740 may be removable or non-removable, and includes magnetic disks, magnetic tapes or cassettes, CD-ROMs, CD-RWs, DVDs, or any other medium that can be used to store information and can be accessed within the computing environment 700. The storage 740 stores instructions for the software 780 implementing the encoder/decoder caching scheme.

The input device(s) 750 may be a touch input device such as a keyboard, mouse, pen, or trackball, a voice input device, a scanning device, or another device that provides input to the computing environment 700. For audio, the input device(s) 750 may be a sound card or similar device that accepts audio input in analog or digital form, or a CD-ROM reader that provides audio samples to the computing environment 700. The output device(s) 760 may be a display, printer, speaker, CD-writer, or another device that provides output from the computing environment 700.

The communication connection(s) 770 enable communication over a communication medium to another computing entity. The communication medium conveys information, such as computer-executable instructions, compressed audio or video information, or other data in a modulated data signal. A modulated data signal is a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired or wireless techniques implemented with an electrical, optical, RF, infrared, acoustic, or other carrier.

The encoder/decoder frame caching techniques herein can be described in the general context of computer-readable media. Computer-readable media are any available media that can be accessed within a computing environment 700. By way of example, and not limitation, with the computing environment 700, computer-readable media include memory 720, storage 740, communication media, and combinations of any of the above.

The encoder/decoder frame caching herein can be described in the general context of computer-executable instructions, such as those included in program modules, being executed in a computing environment on a target real or virtual processor. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The functionality of the program modules may be combined or split between program modules as desired in various embodiments. Computer-executable instructions for program modules may be executed within a local or distributed computing environment.

For the sake of presentation, the detailed description uses terms like “determine”, “transmit”, “encode”, “decode”, and “apply” to describe computer operations in a computing environment. These terms are high-level abstractions for operations performed by a computer, and should not be confused with acts performed by a human being. The actual computer operations corresponding to these terms vary depending on implementation.

In view of the many possible embodiments to which the principles of our invention may be applied, it should be recognized that the detailed embodiments are illustrative only and should not be taken as limiting the scope of our invention. Rather, we claim as our invention all such embodiments as may come within the scope and spirit of the following claims and equivalents thereto. 

We claim:
 1. A method performed with a video decoder, the method comprising: receiving a sequence of frames comprising intra-coded key frames and predicted frames, the predicted frames being encoded with reference to a respective reference frame, at least one of the frames being marked as a cached frame; retaining the cached frame in a frame cache at the decoder; sending a signal indicating the cached frame; detecting loss for a frame sent to the decoder, the lost frame being encoded with reference to a first reference frame different than the cached frame; responsive to the detecting loss, receiving a new frame, the new frame being encoded with reference to the cached frame; decoding the new frame with reference to the cached frame; and producing a reconstructed frame sequence based on the decoded new frame.
 2. The method of claim 1, wherein the new frame is a replacement frame encoded for the lost frame.
 3. The method of claim 1, further comprising retaining the first reference frame in a first portion of the frame cache, and wherein the second reference frame is concurrently retained in a different, second portion of the frame cache.
 4. The method of claim 1, further comprising, responsive to the detecting loss, sending a packet loss detection signal to an encoder indicating that packet loss has been detected.
 5. The method of claim 4, wherein the packet loss detection signal is not sent if a frame is not correctly decoded.
 6. The method of claim 4, wherein the packet loss detection signal indicates a sequence number of the lost frame.
 7. The method of claim 4, wherein the packet loss detection signal contains information and a sequence number that allows the encoder to determine a number of packets that are being lost.
 8. The method of claim 4, wherein the packet loss detection signal comprises a timestamp.
 9. The method of claim 1, further comprising: caching the cached frame at the decoder periodically.
 10. The method of claim 1, wherein at least one subsequent frame is generated at the decoder using at least in part the cached frame.
 11. The method of claim 1, wherein: copies of the same frame are cached at the decoder and at an encoder that generates the new frame; and the method further comprises caching the frame at the encoder in synchronization with caching the frame at the decoder.
 12. The method of claim 1, further comprising receiving the sequence of frames via a network, wherein cached frames are retained at intervals based on speed of the network an amount of loss in the network.
 13. The method of claim 1, wherein at least one frame retained in the frame cache is a reference frame.
 14. A computer-readable storage device or memory storing computer-readable instructions that when executed by a computer, cause the computer to perform the method of claim
 1. 15. A computer system comprising a processor and memory that implements a video decoder, the video decoder comprising: a decoder configured to produce decompressed video information for a sequence of frames received via a network; a decoder-side frame cache comprising: a first portion configured to store a first reference frame, the first portion corresponding to a first portion of an encoder-side frame cache at a video encoder, wherein the first reference frame includes a frame header that indicates that the first reference frame is to be cached in the first portion of the frame cache after being decoded, and a second portion configured to store a second reference frame, the second portion corresponding to a second portion of the encoder-side frame cache at the video encoder; and wherein the decoder is configured to, responsive to detecting loss of a frame in the sequence of frames, the lost frame being encoded with reference to the first reference frame: generate a loss detection signal indicating the second reference frame, in response to the detecting loss of the frame, and decode a new frame received via the network, the new frame being encoded with reference to the second reference frame.
 16. The system of claim 15, wherein the second reference frame includes a frame header that indicates that the second reference frame is to be cached in the second portion of the frame cache after being decoded.
 17. The system of claim 15, wherein the new frame is a replacement framed encoded for the lost frame.
 18. The system of claim 15, wherein the loss detection signal indicates the first reference frame, the second reference frame, or a sequence number of the lost frame.
 19. The system of claim 15, wherein the decoder is further configured to store the first reference frame and the second reference frame in their respective portions of the decoder-side frame cache periodically.
 20. The system of claim 15, wherein the decoder is further configured to store the first reference frame in synchronization with a copy of the first reference frame stored at the video encoder.
 21. A method performed with a video encoder, the method comprising: encoding a video signal into a sequence of frames, one or more of the frames being marked to indicate that the marked frames are cached frames; storing the cached frames at the encoder in an encoder-side frame cache; producing a signal to transmit the frames; detecting loss of encoded data for at least one of the frames transmitted by the video encoder, the lost frame having been encoded with reference to a first one of the cached frames; receiving a loss detection signal sent in response to the detecting loss of encoded data, the loss detection signal indicating one of the first cached frame or the second cached frame; and responsive to the detecting loss, encoding a new frame with reference to a second one of the cached frames, the new frame being decodable by a video decoder using encoded data for the new frame and a copy of the second cached frame stored in a decoder-side frame cache.
 22. The method of claim 21, wherein the new frame is a replacement frame encoded for the lost frame.
 23. The method of claim 21, wherein the encoder-side frame cache comprises a first portion storing the first cached frame and a second portion concurrently storing the second cached frame.
 24. The method of claim 21, wherein the detecting loss is based on not receiving a signal from a decoder indicating receipt of one or more of the sequence of frames.
 25. The method of claim 21, wherein at least one frame subsequent to the new frame is generated at the encoder with reference to the second cached frame. 